home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Support Library
/
RoseWare - Network Support Library.iso
/
apidev
/
tst.arc
/
TST.ASM
Wrap
Assembly Source File
|
1988-04-07
|
7KB
|
261 lines
CSEG segment para public 'code'
ORG 100h
assume cs:cseg
SOCKET EQU 9559h
;******************** THERE IS 1 HARD CODED ADDRESS IN THIS PROGRAM
;******************** DST1 BELOW NEEDS TO HAVE THE ADDRESS OF THE
;******************** LISTENING PROGRAM HARD CODED. THIS IS A 10
;******************** BYTE NUMBER WITH HIGHEST BYTE FIRST. A
;******************** "USERLIST /A" WILL LIST THE ADDRESSES, IE.
;******************** [ 333] [ 2A] WOULD BE ENTERED AS:
;******************** 00h,00h,03h,33h,00h,00h,00h,00h,00h,2Ah
;
;
; Compile into a .COM file, on the machine whose address was entered
; below run "TST" without any paramaters. On another machine run
; "TST 1". The "TST 1" machine will display a character every 10
; clock tics, the "TST" machine will echo the packet back to the
; calling station which will print the echoed character. This will
; show up as one character printed twice together.
;
; On the 2.1 Omninet drivers this will work so long as the "TST"
; machine does not access netware, if accessing netware the machine
; will lock up very quickly (Usually less than 1 minute of constant
; network access.)
; The following are the results of testing with different configurations.
; TST.COM was loaded on a machine then a batch file which copied a file
; and executed its self again was run. Each test was run about 10 mins.
; 2.1 IPX Omninet no int & 2.1 NET3.COM 20 times locked up within 1 min
; 2.1 IPX Omninet int 2 & 2.1 NET3.COM 20 times locked up within 1 min
; 2.1 IPX Arcnet & 2.1 NET3.COM 5 times NO lockup
; 2.0a ANET3.COM Omninet no int 10 times NO lockup
; 2.0a ANET3.COM Omninet int 2 10 times NO lockup
; 2.0a ANET3.COM Pronet 10 5 times NO lockup
; 2.1 IPX Omninet no int & 2.0a ANET3.COM 10 time locked up within 1 min
; 2.1 IPX Omninet int 2 & 2.0a ANET3.COM 10 time locked up within 1 min
; 2.0a ANET3.COM Arcnet 5 times NO lockup
; 2.1 IPX Omni no int no shell DOS copy 5 times NO lockup
; An INS gateway based on NETBIOS would lock up on 2.1 Omninet after about
; 10 minutes and always during a read or write.
; Varying the IPX version on the calling station had no effect on the
; outcome of any of the tests. No other memory resident software was in
; use on either the calling or listening computers. Crossing bridges made
; no difference, DOS versions made no difference, the lockup would also
; occur doing DIRs or running SYSCON or running LOGIN or TYPEing files, or
; any other netware function that I did often enough. Using a program
; called HWLIGHT during some of the copies I did see that the lockups
; ALWAYS occured DURING a netware file READ or WRITE.
ENTRY: JMP MAIN
ECB1 dd 0
ADR1 dw 0 ;address of service routine
SEG1 dw 0
INUSE1 db 0 ;in-use flag
db 0 ;completion code
SOCK1 DW SOCKET ;our socket number
db 16 dup(0) ;ipx work space
IMAD1 db 6 dup (0) ;other station's address
dw 1 ;one fragment
dw FRAG1 ;fragment's address
SEG1F dw 0
dw 31 ;fragment size
FRAG1 db 0,0 ;packet checksum
db 0,31 ;length
db 0
db 0 ;packet type
DST1 db 0,0,0,5,0,0,0,0,0,0Bh ;DESTINATION **HARD CODE***
DW SOCKET
SRC1 db 12 dup(0) ;his address
MSG1 DB 0 ;message
ECB2 dd 0
ADR2 dw 0 ;address of service routine
SEG2 dw 0
INUSE2 db 0 ;in-use flag
db 0 ;completion code
SOCK2 DW 0 ;our socket number
db 16 dup(0) ;ipx work space
IMAD2 db 6 dup (0) ;other station's address
dw 1 ;one fragment
dw FRAG2 ;fragment's address
SEG2F dw 0
dw 31 ;fragment size
FRAG2 db 0,0 ;packet checksum
db 0,31 ;length
db 0
db 0 ;packet type
DST2 db 12 dup(0) ;my address
SRC2 db 12 dup(0) ;his address
MSG2 DB 0 ;message
ECB3 dd 0
ADR3 dw 0 ;address of service routine
SEG3 dw 0
INUSE3 db 0 ;in-use flag
db 0 ;completion code
db 36 dup(0) ;ipx work space
;************************************************************************
;* Event service routine for memory resident portion of TST *
;************************************************************************
RCVD proc far ;event service routine
push cs
pop ds
push cs
pop es
cld ;forward direction
mov si,offset IMAD2 ;move immediate addresses
mov di,offset IMAD1
mov cx,6 ;6 bytes
rep movsb
mov si,offset SRC2 ;received source address
mov di,offset DST1 ;xmitted dest address
mov cx,12 ;12 bytes
rep movsb
MOV AL,MSG2
MOV MSG1,AL
mov si,offset ECB1
mov bx,3
CALL IPX ; make sure we don't miss anything
mov si,offset ECB2
mov bx,4
CALL IPX ; make sure we don't miss anything
CLI ; ESRs MUST RETURN WITH INTS OFF
RET ; LEAVE
RCVD ENDP
IPX PROC NEAR
PUSH CS
POP DS
PUSH CS
POP ES
PUSH BP
INT 7Ah
POP BP
PUSH CS
POP ES
PUSH CS
POP DS
RET
IPX ENDP
;************************************************************************
;* Main section of program *
;************************************************************************
MAIN:
MOV SEG1F,CS
MOV SEG2,CS
MOV SEG2F,CS
CMP BYTE PTR DS:[80h],0
JZ MAIN10
JMP MAIN50
MAIN10: ;*********** Setup MEMORY resident portion
MOV BX,0 ; OPEN SOCKET
MOV DX,SOCKET ; RECEIVE SOCKET
MOV SOCK1,DX
MOV SOCK2,DX
MOV AL,0FFh ; PERMANENT
CALL IPX
MOV ADR2,OFFSET RCVD
MOV SI,OFFSET ECB2
MOV BX,4
CALL IPX
MOV DX,OFFSET MAIN
INT 27h
MAIN50: ;*********** Set up Calling section
MOV ADR2,OFFSET RCVD2
MOV SEG3,CS
MOV ADR3,OFFSET TIMLOOP
MOV BX,0 ;open socket
MOV DX,0 ;transmit socket
MOV AL,0 ;temporary
CALL IPX
MOV SOCK1,DX
MOV SOCK2,DX
mov si,offset dst1
mov di,offset imad1
mov bx,2 ;get local target
CALL IPX
MOV SI,OFFSET ECB2
MOV BX,4
CALL IPX
MOV SI,OFFSET ECB3
MOV AX,10
MOV BX,7
CALL IPX
MAIN60: MOV AH,1 ; Loop until a key is struck
INT 16h
JZ MAIN60
MOV AH,0
INT 16h
MOV SI,OFFSET ECB3
MOV BX,6
CALL IPX
MOV SI,OFFSET ECB2
MOV BX,6
CALL IPX
MOV SI,OFFSET ECB1
MOV BX,6
CALL IPX
MOV DX,SOCK1
MOV BX,1
CALL IPX
INT 20h
;************************************************************************
;* Receive an echoed IPX packet and display the character *
;************************************************************************
RCVD2 proc far ;event service routine
MOV AL,MSG2
MOV AH,14
XOR BX,BX
MOV BL,70h
MOV CX,1
INT 10h
MOV SI,OFFSET ECB2
MOV BX,4
CALL IPX
CLI
RET
RCVD2 ENDP
;************************************************************************
;* Every 10 tics display another character and send the IPX packet *
;************************************************************************
TIMLOOP proc far ;event service routine
INC MSG1
MOV AL,MSG1
MOV AH,14
XOR BX,BX
MOV BL,7
MOV CX,1
INT 10h
CMP INUSE1,0
JZ TM10
MOV SI,OFFSET ECB1
MOV BX,6
CALL IPX
TM10: MOV SI,OFFSET ECB1
MOV BX,3
CALL IPX
MOV SI,OFFSET ECB3
MOV AX,10
MOV BX,7
CALL IPX
CLI
RET
TIMLOOP ENDP
CSEG ENDS
END ENTRY